package com.example.dao;

import com.example.entity.Year;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.ReactiveNeo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 *
 */
@Repository
public interface YearRepository extends Neo4jRepository<Year, Long> {
    @Query("MATCH (y:Year)-[r:GuanXi]->(m:Month) WHERE y.year = $year RETURN y, r, m limit 1 ")
    public Year findByYear(String year);


}
